/**
 * Created by root on 17-4-9.
 */
var EventEmitter = require('events').EventEmitter;
var life= new EventEmitter();
life.setMaxListeners(11);

function fun1(who) {
    console.log(who);
}
life.on('e', fun1);
life.on('e1', fun1);
life.removeAllListeners('e');
//life.removeListener('e', fun1);
var hasConfortListener = life.emit('e1', "Mike");
console.log(life.listeners('e1').length);
console.log(hasConfortListener);
console.log(EventEmitter.listenerCount(life, 'e'));